<form name="form" action="?module=backoffice&action=AjaxSaveBlockParams" method="POST" class="nyroModal">
	{include file="$MODULES_DIR/backoffice/templates/block/modal/ModalTitle.html" title=$blockParams.blockLabel}
    <div id="modalContent">
        <div id="modalTabs">
        <ul>
            <li><a class="selected" href="#" title="{t}Content{/t}" rel="tab1"><span>{t}Content{/t}</span></a></li>
            <li><a href="#" title="{t}List properties{/t}" rel="tab2"><span>{t}List header{/t}</span></a></li>
            <li><a href="#" title="{t}List properties{/t}" rel="tab3"><span>{t}List properties{/t}</span></a></li>
            <li><a href="#" title="{t}Detail properties{/t}" rel="tab4"><span>{t}Detail properties{/t}</span></a></li>
            <li><a href="#" title="{t}Skinning{/t}" rel="tab5"><span>{t}Skinning{/t}</span></a></li>
        </ul>
        </div>        
        <div id="tab1" class="modalTab">
            <table class="listTable">
                <tr>
                    {t assignTo=iconTitle}Folder - You can select a folder. If no folder is selected, the block will display all news.{/t}
                    <td style="width:16px;">
                        {icon name="help.png" class="toolTip icon16" title="$iconTitle"}
                    </td>
                    <td>{t}Select a news folder{/t}</td>
                    <td>
                        <select name="form[folderNewsId]">
                            <option value="">{t}No folder{/t}</option>
                        {foreach from=$folders item=folder}
                        <option value="{$folder->getUniqueId()}" {if isset($blockParams.folderNewsId) && $blockParams.folderNewsId == $folder->getUniqueId()}selected="selected"{/if}>{$folder->getLabel()}</option>
                        {/foreach}
                        </select>
                    </td>
                </tr>
            </table>
        </div>
        <div id="tab2" class="modalTab">
            <table class="listTable">
                <tr>
                    <td>{t}Title{/t}</td>
                    <td>
                        <input type="text" name="form[listTitle]" value="{$blockParams.listTitle}" class="medium" />
                    </td>
                </tr>
                <tr>
                    <td>{t}Header{/t}</td>
                    <td>
                        <textarea name="form[listHeader]" rows="15" cols="65">{if isset($blockParams.listHeader)}{$blockParams.listHeader}{/if}</textarea>
                    </td>
                </tr>
            </table>
        </div>
        <div id="tab3" style="display:none" class="modalTab">
            <table class="listTable">
                <tr>
                    <td></td>
                    <td>{t}Display Title{/t}</td>
                    <td>
                        <select name="form[displayTitle]">
                            <option value="1">{t}Yes{/t}</option>
                            <option value="0" {if !$blockParams.displayTitle}selected="selected"{/if}>{t}No{/t}</option>
                        </select>
                    </td>
                </tr>
                <tr>
                    <td></td>
                    <td>{t}Display Subtitle{/t}</td>
                    <td>
                        <select name="form[displaySubTitle]">
                            <option value="1">{t}Yes{/t}</option>
                            <option value="0" {if !$blockParams.displaySubTitle}selected="selected"{/if}>{t}No{/t}</option>
                        </select>
                    </td>
                </tr>
                <tr>
                    <td></td>
                    <td>{t}Display Header{/t}</td>
                    <td>
                        <select name="form[displayHeader]">
                            <option value="1">{t}Yes{/t}</option>
                            <option value="0" {if !$blockParams.displayHeader}selected="selected"{/if}>{t}No{/t}</option>
                        </select>
                    </td>
                </tr>
                <tr>
                    <td></td>
                    <td>{t}Display Author{/t}</td>
                    <td>
                        <select name="form[displayAuthor]">
                            <option value="1">{t}Yes{/t}</option>
                            <option value="0" {if !$blockParams.displayAuthor}selected="selected"{/if}>{t}No{/t}</option>
                        </select>
                    </td>
                </tr>
                <tr>
                    <td></td>
                    <td>{t}Display Date{/t}</td>
                    <td>
                        <select name="form[displayDate]">
                            <option value="1">{t}Yes{/t}</option>
                            <option value="0" {if !$blockParams.displayDate}selected="selected"{/if}>{t}No{/t}</option>
                        </select>
                    </td>
                </tr>
                <tr>
                    <td></td>
                    <td>{t}Display linked pictures{/t}</td>
                    <td>
                        <select name="form[displayListPicture]">
                            <option value="1">{t}Yes{/t}</option>
                            <option value="0" {if !$blockParams.displayListPicture}selected="selected"{/if}>{t}No{/t}</option>
                        </select>
                    </td>
                </tr>
                <tr>
                    <td></td>
                    <td>{t}Display the link label{/t}</td>
                    <td>
                        <select name="form[displayLinkLabel]">
                            <option value="1">{t}Yes{/t}</option>
                            <option value="0" {if !$blockParams.displayLinkLabel}selected="selected"{/if}>{t}No{/t}</option>
                        </select>
                    </td>
                </tr>
                <tr>
                    <td></td>
                    <td>{t}Link label{/t}</td>
                    <td>
                        <input type="test" name="form[linkLabel]" value="{$blockParams.linkLabel|escape:'html'}" class="medium" />
                    </td>
                </tr>
            </table>
        </div>

       <div id="tab4" style="display:none" class="modalTab">
            <table class="listTable">
                <tr>
                    <td></td>
                    <td>{t}Display Title{/t}</td>
                    <td>
                        <select name="form[detailDisplayTitle]">
                            <option value="1">{t}Yes{/t}</option>
                            <option value="0" {if !$blockParams.detailDisplayTitle}selected="selected"{/if}>{t}No{/t}</option>
                        </select>
                    </td>
                </tr>
                <tr>
                    <td></td>
                    <td>{t}Display Subtitle{/t}</td>
                    <td>
                        <select name="form[detailDisplaySubTitle]">
                            <option value="1">{t}Yes{/t}</option>
                            <option value="0" {if !$blockParams.detailDisplaySubTitle}selected="selected"{/if}>{t}No{/t}</option>
                        </select>
                    </td>
                </tr>
                <tr>
                    <td></td>
                    <td>{t}Display Header{/t}</td>
                    <td>
                        <select name="form[detailDisplayHeader]">
                            <option value="1">{t}Yes{/t}</option>
                            <option value="0" {if !$blockParams.detailDisplayHeader}selected="selected"{/if}>{t}No{/t}</option>
                        </select>
                    </td>
                </tr>
                <tr>
                    <td></td>
                    <td>{t}Display Author{/t}</td>
                    <td>
                        <select name="form[detailDisplayAuthor]">
                            <option value="1">{t}Yes{/t}</option>
                            <option value="0" {if !$blockParams.detailDisplayAuthor}selected="selected"{/if}>{t}No{/t}</option>
                        </select>
                    </td>
                </tr>
                <tr>
                    <td></td>
                    <td>{t}Display Date{/t}</td>
                    <td>
                        <select name="form[detailDisplayDate]">
                            <option value="1">{t}Yes{/t}</option>
                            <option value="0" {if !$blockParams.detailDisplayDate}selected="selected"{/if}>{t}No{/t}</option>
                        </select>
                    </td>
                </tr>
                <tr>
                    <td></td>
                    <td>{t}Show top navigation{/t}</td>
                    <td>
                        <select name="form[showTopNav]">
                            <option value="1">{t}Yes{/t}</option>
                            <option value="0" {if !$blockParams.showTopNav}selected="selected"{/if}>{t}No{/t}</option>
                        </select>
                    </td>
                </tr>
                <tr>
                    <td></td>
                    <td>{t}Show bottom navigation{/t}</td>
                    <td>
                        <select name="form[showBottomNav]">
                            <option value="1">{t}Yes{/t}</option>
                            <option value="0" {if !$blockParams.showBottomNav}selected="selected"{/if}>{t}No{/t}</option>
                        </select>
                    </td>
                </tr>
            </table>
        </div>

        <div id="tab5" style="display:none" class="modalTab">
            <div class="blockParamsSubmit">
                <input type="hidden" value="{$blockParams.blockId}" name="form[blockId]"/>
                <input type="hidden" value="{$blockParams.pageId}" name="form[pageId]"/>
                <input type="hidden" value="{$blockParams.pageLang}" name="form[pageLang]"/>
            </div>
            <table class="listTable">
                <tr>
                    {t assignTo=help}CSS class - You can define an additional css class to differ news blocks{/t}
                    <td style="width:16px;">
                        {icon name="help.png" class="toolTip icon16" title=$help}
                    </td>
                    <td>{t}Additional block CSS class{/t}</td>
                    <td>
                        <input type="text" name="form[css]" value="{$blockParams.css}" class="medium" />
                    </td>
                </tr>
                <tr>
                    {t assignTo=help}Header - The length of displayed header in news list. The header is truncated by sentence. Default : 100{/t}
                    <td style="width:16px;">
                        {icon name="help.png" class="toolTip icon16" title=$help}
                    </td>
                    <td>{t}Header length{/t}</td>
                    <td>
                        <input type="text" name="form[headerLength]" value="{$blockParams.headerLength}" class="small" />
                    </td>
                </tr>
                <tr>
                    {t assignTo=help}Picture - Maximum size of the image in the news list. If the image is not properly formatted it will not be displayed.{/t}
                    <td style="width:16px;">
                        {icon name="help.png" class="toolTip icon16" title=$help}
                    </td>
                    <td>{t}Picture size in list{/t}</td>
                    <td>
                        <input type="text" name="form[picWidth]" value="{$blockParams.picWidth}" class="verySmall" /> /
                        <input type="text" name="form[picHeight]" value="{$blockParams.picHeight}" class="verySmall" /> px
                    </td>
                </tr>
                <tr>
                    {t assignTo=help}Picture - Maximum size of the image in the details. If the image is not properly formatted it will displayed the original size.{/t}
                    <td style="width:16px;">
                        {icon name="help.png" class="toolTip icon16" title=$help}
                    </td>
                    <td>{t}Picture size in detail{/t}</td>
                    <td>
                        <input type="text" name="form[picWidthDetail]" value="{if isset($blockParams.picWidthDetail)}{$blockParams.picWidthDetail}{/if}" class="verySmall" /> /
                        <input type="text" name="form[picHeightDetail]" value="{if isset($blockParams.picHeightDetail)}{$blockParams.picHeightDetail}{/if}" class="verySmall" /> px
                    </td>
                </tr>
                <tr>
                    {t assignTo=help}View - You can define an other view to get another template{/t}
                    <td style="width:16px;">
                        {icon name="help.png" class="toolTip icon16" title=$help}
                    </td>
                    <td>{t}View template{/t}</td>
                    <td>
                        <input type="text" name="form[view]" value="{$blockParams.view}" class="medium" />
                    </td>
                </tr>
            </table>
        </div>
    </div>
    {include file="$MODULES_DIR/backoffice/templates/block/modal/ModalFooter.html"}
</form>